package com.xiaohu;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * 程序主入口，启动类
 */
@SpringBootApplication
@MapperScan(basePackages = "com.xiaohu.dao")//mapper接口的包扫描（basePackages）
public class StartApplication {
    public static void main(String[] args) {

        ConfigurableApplicationContext applicationContext = SpringApplication.run(StartApplication.class);
        int bdcount = applicationContext.getBeanDefinitionCount();
        System.out.println(bdcount);
        boolean containsBean = applicationContext.containsBean("user");
        System.out.println(containsBean);
    }

}
